/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package grundlagen;

/**
 *
 * @author dgreipl
 */
public class MySinus {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       double x = 10.1;
       int k = 0;
       double sk = x; //k-ter Summand
       double sum = x;

       while (k < 30){
           sk = -sk*x*x/((2*k+2)*(2*k+3));
           sum = sum + sk;
           k = k +1;
       }

        System.out.println("Mein sinus : " + sum);
        System.out.println("Java Sinus : " + Math.sin(x));

        System.out.println("A\\B");

    }

}
